package com.marvels.loanapply.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.marvels.common.utils.MarvelsLogUtil;
import com.marvels.loanapply.api.RelationInfoApi;
import com.marvels.loanapply.dto.MclaRelationInfoDTO;

import net.sf.json.JSONObject;

/**
 * 联系人关系controller
 * @author tangpw
 *
 */
@RequestMapping("/loanApply/relationInfo/api")
@RestController
public class RelationInfoController {

	@Autowired
	private RelationInfoApi relationApi;
	
	@RequestMapping("relationList")
	@ResponseBody
	public List<MclaRelationInfoDTO> relationList(@RequestBody MclaRelationInfoDTO dto){
		MarvelsLogUtil.getInstance().info(">>>>>relationList联系人关系基请求参数:"+JSONObject.fromObject(dto));
		List<MclaRelationInfoDTO> list=relationApi.relationList(dto);
		MarvelsLogUtil.getInstance().info(">>>>>relationList联系人关系基返回参数:"+JSONObject.fromObject(list));
		return list;
	}
}